package com.wyt.common.socket;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.InetAddress;

public class OnlineTest {
    private static Logger logger = LoggerFactory.getLogger(OnlineTest.class);

    private boolean isOnline(String ip) {
        try {
            boolean reachable = InetAddress.getByName(ip).isReachable(1500);
            return reachable;
        } catch (Exception e) {
            logger.error("测试ip联通性异常", e);
        }
        return false;
    }

}
